package org.example.Interface.base;


import org.example.Interface.DBi;
import org.example.Interface.ddl.Alter;
import org.example.Interface.ddl.Create;
import org.example.Interface.ddl.Drop;
import org.example.Interface.ddl.Truncate;
import org.example.init.FactoryBuilder;


public  abstract class Base implements DBi {




    public <T> T getIndex(Class<T> finder){
        if(finder== Alter.class)
          return (T) builderAlter();
        if(finder== Create.class)
          return (T) builderCreate();
        if(finder== Drop.class)
          return  (T) builderDrop();
        if(finder== Truncate.class)
          return  (T) builderTruncate();
        throw new RuntimeException("no db operation");

    }
}
